#ifndef __STATEMENT_H__
#define __STATEMENT_H__

#include <sql.h>
#include <sqlext.h>

#include <vector>
#include "Column.h"
#include "Param.h"

class Statement {
public:
    std::vector<Column> col;
    std::vector<Param> par;
    SQLHENV env;
    SQLHDBC dbc;
    SQLHSTMT stmt;
    Statement(SQLHENV env, SQLHDBC dbc);
    void SetAttr(SQLINTEGER option, SQLPOINTER value);
    void Prepare(std::string query);
    void ExecDirect(std::string query);
    void Execute();
    void Tables(std::string schemaname, std::string tablename, std::string tabletype);
    void Columns(std::string schemaname, std::string tablename, std::string colunname);
    void PrimaryKeys(std::string schemaname, std::string tablename);
    bool Fetch();
    ~Statement();
};

#endif /* __STAEMENT_H__ */
